from typing import Optional

from sqlmodel import SQLModel, Field


class SysUserRole(SQLModel, table=True):
    __tablename__ = "sys_user_role"
    __table_args__ = {'extend_existing': True, 'comment': '用户角色关系表'}
    user_id: Optional[int] = Field(primary_key=True, description="用户序号",
                                   sa_column_kwargs={"comment": "用户序号"})
    role_id: Optional[int] = Field(primary_key=True, description="角色序号",
                                   sa_column_kwargs={"comment": "角色序号"})
